﻿using System;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using weikebuluo.DAL;
using weikebuluo.Model;
using weikebuluo.Common;

namespace weikebuluo.web.admin.actives
{
    public partial class zjlist : weikeweixin.web.admin.cs.adminbase
    {
        v_vip_dal vipdal = new v_vip_dal();
        h_ggklog_dal ggklogdal = new h_ggklog_dal();
        JsonOperate JsonOperate = new JsonOperate();
        protected int count = 0;
        protected void Page_Load(object sender, EventArgs e)
        {
            count = ggklogdal.GetRecordCount("ggklog_stutas = 1 and ggks_id=" + Request.QueryString["id"] + " and user_id=" + user_id);
            switch (Request.QueryString["action"])
            {
                case "list":
                    list();
                    break;

            }

        }

        /// <summary>
        ///查询
        /// </summary>
        public void list()
        {
            string where = "user_id=" + user_id + " and ggks_id=" + Request.QueryString["id"] + " and ggklog_award != '1'";
            int Page = int.Parse(Request.Form["page"]);
            int RecordCount = vipdal.GetRecordCount1(where);
            DataTable dtvip = vipdal.GetListByPage1(where, "vip_id", ((Page - 1) * 15) + 1, (Page - 1) * 15 + 15).Tables[0];
            Response.Write(JsonOperate.GetDataGridJson(dtvip, RecordCount));
            Response.End();
        }

    }
}
